<?php
session_start();
if(!isset($_SESSION['username'])) {
   echo "<script>alert('您无权访问,请登录!');window.location.href='login.php';</script>";
    }

?>